<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
	<meta http-equiv="content-type" content="text/xml; charset=utf-8" /> 
    <title>Tour Information</title>
    <meta name="description" content="Green Travel Tour Information"  /> 
	<meta name="keywords" content="tour, green travel, rmit, project, e-business, semester 2012A, tour information, vietnam, vietnam travel"  /> 
	<link rel="stylesheet" type="text/css" href="formatstyles.css"/> 
	<link rel="stylesheet" type="text/css" href="divstyles.css"/> 
    <link rel="stylesheet" type="text/css" href="style/css/jquery-ui-1.8.18.custom.css" />
	
	<!-- include CSS always before including js -->

	<!-- include jQuery library -->
	<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
	<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="js/jquery.cycle.all.js"></script>
	<script type="text/javascript" src="js/scripts.js"></script>
	<script type="text/javascript" src="js/tablecloth.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
	<script type="text/javascript" src="js/login.js"></script>
	<script type="text/javascript" src="js/comment.js"></script>
	<link rel="stylesheet" type="text/css" media="screen" href="style/css/demos.css"/>
	<style type="text/css" media="screen"> 
		@import "style/css/uni-form.css"; 
	</style>
	
	<!-- Demo page js -->
	<script type="text/javascript" src="js/jquery.uni-form.js"></script>
	
	<!-- Star Rating widget stuff here... -->
	<script type="text/javascript" src="js/jquery.ui.stars.js"></script>
	<link rel="stylesheet" type="text/css" href="style/css/crystal-stars.css"/>
	<link rel="stylesheet" type="text/css" href="style/css/jquery.ui.stars.css"/>
	<script type="text/javascript" src ="js/language-en.js"></script> 
	<script type="text/javascript" src ="js/nopcart.js" language="javascript"> 
	
      //============================================================== 
      //               NOP Design JavaScript Shopping Cart               
      //-------------------------------------------------------------- 
	  //       Visit NOP Design at http://www.nopdesign.com/freecart     
	  //============================================================== 
	</script> 

</head>

<body>
<div id="fade" style="display:none;"></div>
	<!-- This is the page section -->
	<div id="page_section">

		<!-- This is the banner --> 
		<div id="banner"> 
 			<?php include("banner.php"); ?>
		</div> 
		<!-- This is end of the banner --> 
    
    	<div id="user-cpanel">
		<?php include("user_cpanel.php"); ?>
        </div>
        <div class="wan-clear"></div>
        <div id="user-form">
       	<?php include("user-form.php"); ?>
		</div>
		<div id="topnav">
           <?php include("top-nav.php"); ?>
        </div>
			
		<div id="left-top">
            <div class="title-text">Search Tour</div>
            <?php include("search-form.php"); ?>	    
		</div>
		
		<div id="right-top">
		<?php
			
            
                while($record = mysql_fetch_array($result)){
				$day = idate("d",strtotime($record['date']));
			$month = idate("m",strtotime($record['date']));
			$year = idate("Y",strtotime($record['date']));
			$ID = $record['eventID'];
			$date = $record['date'];
				echo '<div class="title-text">'.$record['name'].' ('.$date.')</div>';
				echo '<img src="'.$record['image'].'" />';
				echo '<br/><br/><div style="color:#17A7AE">'.$record['description'].'</div><br/>';
				

echo '<div id="'.$ID.'" class="caption" style="color: #BB1714; text-align:center;font-family: Helvetica,sans-serif;font-size:150%" >Countdown</div>';
			echo '
				<script language="javascript" type="text/javascript">
					var montharray'.$ID.'=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

					function countdown'.$ID.'(yr,m,d){
					
						theyear'.$ID.'=yr;themonth'.$ID.'=m;theday'.$ID.'=d;
						var today'.$ID.'=new Date();
						var todayy'.$ID.'=today'.$ID.'.getYear();
					
						if (todayy'.$ID.' < 1000) {
							todayy'.$ID.'+=1900
						}
						
						var todaym'.$ID.'=today'.$ID.'.getMonth();
						var todayd'.$ID.'=today'.$ID.'.getDate();
						var todayh'.$ID.'=today'.$ID.'.getHours();
						var todaymin'.$ID.'=today'.$ID.'.getMinutes();
						var todaysec'.$ID.'=today'.$ID.'.getSeconds();
						var todaystring'.$ID.'=montharray'.$ID.'[todaym'.$ID.']+" "+todayd'.$ID.'+", "+todayy'.$ID.'+" "+todayh'.$ID.'+":"+todaymin'.$ID.'+":"+todaysec'.$ID.';
					
						futurestring'.$ID.'=montharray'.$ID.'[m-1]+" "+d+", "+yr;
						dd'.$ID.'=Date.parse(futurestring'.$ID.')-Date.parse(todaystring'.$ID.');
						dday'.$ID.'=Math.floor(dd'.$ID.'/(60*60*1000*24)*1);
						dhour'.$ID.'=Math.floor((dd'.$ID.'%(60*60*1000*24))/(60*60*1000)*1);
						dmin'.$ID.'=Math.floor(((dd'.$ID.'%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
						dsec'.$ID.'=Math.floor((((dd'.$ID.'%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
					
						document.getElementById("'.$ID.'").innerHTML = dday'.$ID.'+ " days, "+dhour'.$ID.'+" hours "+dmin'.$ID.'+" minutes "+dsec'.$ID.'+" seconds left";
						setTimeout("countdown'.$ID.'(theyear'.$ID.',themonth'.$ID.',theday'.$ID.')",1000);
					}
				
					countdown'.$ID.'('.$year.','.$month.','.$day.');	
								
				</script>';
			echo "</li>";
                }
                
            ?>
		</div>

		<div class="wan-clear"></div>
		
<!-- This is end of the content -->

<!-- This is the footer -->
		
<!-- This is end of the footer -->
	</div> 
	<div id="footer"> 
 
			<p class="footer">This website is a student project that is intended to be used only for academic purposes. This page was created by Long, Tran Hoang </p>

			
		</div> 
<!-- This is end of the page section -->
</body>

</html>